<template>
	<view class="u-wrap">
		<u-navbar title="房源信息"></u-navbar>
		<view class="charts-box">
		  <qiun-data-charts type="column" :chartData="chartsDataColumn1" />
		</view>

		
	</view>
</template>

<script>
	
	export default {
		data() {
			return {

				chartsDataColumn1:{},

			}
		},
	
		onLoad() {
		
		},
		onReady() {
		  //模拟从服务器获取数据
		  this.getServerData()
		},
		onShow() {
			
		},
		methods: {
		 getServerData() {
			 setTimeout(() => {
			 	//因部分数据格式一样，这里不同图表引用同一数据源的话，需要深拷贝一下构造不同的对象
			 	//开发者需要自行处理服务器返回的数据，应与标准数据格式一致，注意series的data数值应为数字格式
			   this.chartsDataColumn1 = {
						categories: ["2016", "2017", "2018", "2019", "2020", "2021"],
						series: [{
							name: "目标值",
							data: [35, 36, 31, 33, 13, 34]
						}, {
							name: "完成量",
							data: [18, 27, 21, 24, 6, 28]
						}]
					}
			 }, 1500);
		 }

		}
	}
</script>

<style lang="scss" scoped>
	.charts-box {
	  padding: 20rpx;
	  height: 300px;
	}
</style>
